#include "BulletSoftBody/btSoftBodyInternals.h"
#ifdef __cplusplus
extern "C" {
#endif
btSoftColliders::CollideVF_SS* bullet_NewbtSoftCollidersCollideVF_SS(){
	btSoftColliders::CollideVF_SS* wrap_out = new btSoftColliders::CollideVF_SS();
	return wrap_out;
}

double bullet_btSoftCollidersCollideVF_SS_GetFieldOfMrg(btSoftColliders::CollideVF_SS* c_this){
	return (double)(c_this->mrg);
}

void bullet_btSoftCollidersCollideVF_SS_Process(btSoftColliders::CollideVF_SS* c_this,btDbvtNode* lnode,btDbvtNode* lface){
	btDbvtNode const * c_arg_lnode=(btDbvtNode const *)(void*)(lnode);
	btDbvtNode const * c_arg_lface=(btDbvtNode const *)(void*)(lface);
	c_this->Process(c_arg_lnode,c_arg_lface);
}

btSoftColliders::CollideVF_DD* bullet_NewbtSoftCollidersCollideVF_DD(){
	btSoftColliders::CollideVF_DD* wrap_out = new btSoftColliders::CollideVF_DD();
	return wrap_out;
}

double bullet_btSoftCollidersCollideVF_DD_GetFieldOfMrg(btSoftColliders::CollideVF_DD* c_this){
	return (double)(c_this->mrg);
}

bool bullet_btSoftCollidersCollideVF_DD_GetFieldOfUseFaceNormal(btSoftColliders::CollideVF_DD* c_this){
	return (bool)(c_this->useFaceNormal);
}

void bullet_btSoftCollidersCollideVF_DD_Process(btSoftColliders::CollideVF_DD* c_this,btDbvtNode* lnode,btDbvtNode* lface){
	btDbvtNode const * c_arg_lnode=(btDbvtNode const *)(void*)(lnode);
	btDbvtNode const * c_arg_lface=(btDbvtNode const *)(void*)(lface);
	c_this->Process(c_arg_lnode,c_arg_lface);
}

btSoftColliders::CollideSDF_RS* bullet_NewbtSoftCollidersCollideSDF_RS(){
	btSoftColliders::CollideSDF_RS* wrap_out = new btSoftColliders::CollideSDF_RS();
	return wrap_out;
}

void bullet_btSoftCollidersCollideSDF_RS_DoNode(btSoftColliders::CollideSDF_RS* c_this,btSoftBody::Node* n){
	btSoftBody::Node& c_arg_n=(btSoftBody::Node&)(*n);
	c_this->DoNode(c_arg_n);
}

double bullet_btSoftCollidersCollideSDF_RS_GetFieldOfDynmargin(btSoftColliders::CollideSDF_RS* c_this){
	return (double)(c_this->dynmargin);
}

double bullet_btSoftCollidersCollideSDF_RS_GetFieldOfStamargin(btSoftColliders::CollideSDF_RS* c_this){
	return (double)(c_this->stamargin);
}

void bullet_btSoftCollidersCollideSDF_RS_Process(btSoftColliders::CollideSDF_RS* c_this,btDbvtNode* leaf){
	btDbvtNode const * c_arg_leaf=(btDbvtNode const *)(void*)(leaf);
	c_this->Process(c_arg_leaf);
}

btSoftColliders::CollideSDF_RDF* bullet_NewbtSoftCollidersCollideSDF_RDF(){
	btSoftColliders::CollideSDF_RDF* wrap_out = new btSoftColliders::CollideSDF_RDF();
	return wrap_out;
}

void bullet_btSoftCollidersCollideSDF_RDF_DoNode(btSoftColliders::CollideSDF_RDF* c_this,btSoftBody::Face* f){
	btSoftBody::Face& c_arg_f=(btSoftBody::Face&)(*f);
	c_this->DoNode(c_arg_f);
}

double bullet_btSoftCollidersCollideSDF_RDF_GetFieldOfDynmargin(btSoftColliders::CollideSDF_RDF* c_this){
	return (double)(c_this->dynmargin);
}

double bullet_btSoftCollidersCollideSDF_RDF_GetFieldOfStamargin(btSoftColliders::CollideSDF_RDF* c_this){
	return (double)(c_this->stamargin);
}

void bullet_btSoftCollidersCollideSDF_RDF_Process(btSoftColliders::CollideSDF_RDF* c_this,btDbvtNode* leaf){
	btDbvtNode const * c_arg_leaf=(btDbvtNode const *)(void*)(leaf);
	c_this->Process(c_arg_leaf);
}

btSoftColliders::CollideSDF_RD* bullet_NewbtSoftCollidersCollideSDF_RD(){
	btSoftColliders::CollideSDF_RD* wrap_out = new btSoftColliders::CollideSDF_RD();
	return wrap_out;
}

void bullet_btSoftCollidersCollideSDF_RD_DoNode(btSoftColliders::CollideSDF_RD* c_this,btSoftBody::Node* n){
	btSoftBody::Node& c_arg_n=(btSoftBody::Node&)(*n);
	c_this->DoNode(c_arg_n);
}

double bullet_btSoftCollidersCollideSDF_RD_GetFieldOfDynmargin(btSoftColliders::CollideSDF_RD* c_this){
	return (double)(c_this->dynmargin);
}

double bullet_btSoftCollidersCollideSDF_RD_GetFieldOfStamargin(btSoftColliders::CollideSDF_RD* c_this){
	return (double)(c_this->stamargin);
}

void bullet_btSoftCollidersCollideSDF_RD_Process(btSoftColliders::CollideSDF_RD* c_this,btDbvtNode* leaf){
	btDbvtNode const * c_arg_leaf=(btDbvtNode const *)(void*)(leaf);
	c_this->Process(c_arg_leaf);
}

btSoftColliders::CollideFF_DD* bullet_NewbtSoftCollidersCollideFF_DD(){
	btSoftColliders::CollideFF_DD* wrap_out = new btSoftColliders::CollideFF_DD();
	return wrap_out;
}

double bullet_btSoftCollidersCollideFF_DD_GetFieldOfMrg(btSoftColliders::CollideFF_DD* c_this){
	return (double)(c_this->mrg);
}

bool bullet_btSoftCollidersCollideFF_DD_GetFieldOfUseFaceNormal(btSoftColliders::CollideFF_DD* c_this){
	return (bool)(c_this->useFaceNormal);
}

void bullet_btSoftCollidersCollideFF_DD_Process(btSoftColliders::CollideFF_DD* c_this,btDbvntNode* lface1,btDbvntNode* lface2){
	btDbvntNode const * c_arg_lface1=(btDbvntNode const *)(void*)(lface1);
	btDbvntNode const * c_arg_lface2=(btDbvntNode const *)(void*)(lface2);
	c_this->Process(c_arg_lface1,c_arg_lface2);
}

void bullet_btSoftCollidersCollideFF_DD_Repel(btSoftColliders::CollideFF_DD* c_this,btSoftBody::Face* f1,btSoftBody::Face* f2){
	btSoftBody::Face * c_arg_f1=(btSoftBody::Face *)(void*)(f1);
	btSoftBody::Face * c_arg_f2=(btSoftBody::Face *)(void*)(f2);
	c_this->Repel(c_arg_f1,c_arg_f2);
}

btSoftColliders::CollideCL_SS* bullet_NewbtSoftCollidersCollideCL_SS(){
	btSoftColliders::CollideCL_SS* wrap_out = new btSoftColliders::CollideCL_SS();
	return wrap_out;
}

void bullet_btSoftCollidersCollideCL_SS_Process(btSoftColliders::CollideCL_SS* c_this,btDbvtNode* la,btDbvtNode* lb){
	btDbvtNode const * c_arg_la=(btDbvtNode const *)(void*)(la);
	btDbvtNode const * c_arg_lb=(btDbvtNode const *)(void*)(lb);
	c_this->Process(c_arg_la,c_arg_lb);
}

void bullet_btSoftCollidersCollideCL_SS_ProcessSoftSoft(btSoftColliders::CollideCL_SS* c_this,btSoftBody* psa,btSoftBody* psb){
	btSoftBody * c_arg_psa=(btSoftBody *)(void*)(psa);
	btSoftBody * c_arg_psb=(btSoftBody *)(void*)(psb);
	c_this->ProcessSoftSoft(c_arg_psa,c_arg_psb);
}

btSoftColliders::CollideCL_RS* bullet_NewbtSoftCollidersCollideCL_RS(){
	btSoftColliders::CollideCL_RS* wrap_out = new btSoftColliders::CollideCL_RS();
	return wrap_out;
}

void bullet_btSoftCollidersCollideCL_RS_Process(btSoftColliders::CollideCL_RS* c_this,btDbvtNode* leaf){
	btDbvtNode const * c_arg_leaf=(btDbvtNode const *)(void*)(leaf);
	c_this->Process(c_arg_leaf);
}

void bullet_btSoftCollidersCollideCL_RS_ProcessColObj(btSoftColliders::CollideCL_RS* c_this,btSoftBody* ps,btCollisionObjectWrapper* colObWrap){
	btSoftBody * c_arg_ps=(btSoftBody *)(void*)(ps);
	btCollisionObjectWrapper const * c_arg_colObWrap=(btCollisionObjectWrapper const *)(void*)(colObWrap);
	c_this->ProcessColObj(c_arg_ps,c_arg_colObWrap);
}

btSoftColliders::CollideCCD* bullet_NewbtSoftCollidersCollideCCD(){
	btSoftColliders::CollideCCD* wrap_out = new btSoftColliders::CollideCCD();
	return wrap_out;
}

double bullet_btSoftCollidersCollideCCD_GetFieldOfDt(btSoftColliders::CollideCCD* c_this){
	return (double)(c_this->dt);
}

double bullet_btSoftCollidersCollideCCD_GetFieldOfMrg(btSoftColliders::CollideCCD* c_this){
	return (double)(c_this->mrg);
}

bool bullet_btSoftCollidersCollideCCD_GetFieldOfUseFaceNormal(btSoftColliders::CollideCCD* c_this){
	return (bool)(c_this->useFaceNormal);
}

void bullet_btSoftCollidersCollideCCD_Process(btSoftColliders::CollideCCD* c_this,btDbvtNode* lnode,btDbvtNode* lface){
	btDbvtNode const * c_arg_lnode=(btDbvtNode const *)(void*)(lnode);
	btDbvtNode const * c_arg_lface=(btDbvtNode const *)(void*)(lface);
	c_this->Process(c_arg_lnode,c_arg_lface);
}

void bullet_btSoftCollidersCollideCCD_Process1(btSoftColliders::CollideCCD* c_this,btDbvntNode* lface1,btDbvntNode* lface2){
	btDbvntNode const * c_arg_lface1=(btDbvntNode const *)(void*)(lface1);
	btDbvntNode const * c_arg_lface2=(btDbvntNode const *)(void*)(lface2);
	c_this->Process(c_arg_lface1,c_arg_lface2);
}

void bullet_btSoftCollidersCollideCCD_Repel(btSoftColliders::CollideCCD* c_this,btSoftBody::Face* f1,btSoftBody::Face* f2){
	btSoftBody::Face * c_arg_f1=(btSoftBody::Face *)(void*)(f1);
	btSoftBody::Face * c_arg_f2=(btSoftBody::Face *)(void*)(f2);
	c_this->Repel(c_arg_f1,c_arg_f2);
}

btSoftColliders::ClusterBase* bullet_NewbtSoftCollidersClusterBase(){
	btSoftColliders::ClusterBase* wrap_out = new btSoftColliders::ClusterBase();
	return wrap_out;
}

double bullet_btSoftCollidersClusterBase_GetFieldOfErp(btSoftColliders::ClusterBase* c_this){
	return (double)(c_this->erp);
}

double bullet_btSoftCollidersClusterBase_GetFieldOfFriction(btSoftColliders::ClusterBase* c_this){
	return (double)(c_this->friction);
}

double bullet_btSoftCollidersClusterBase_GetFieldOfIdt(btSoftColliders::ClusterBase* c_this){
	return (double)(c_this->idt);
}

double bullet_btSoftCollidersClusterBase_GetFieldOfM_margin(btSoftColliders::ClusterBase* c_this){
	return (double)(c_this->m_margin);
}

double bullet_btSoftCollidersClusterBase_GetFieldOfThreshold(btSoftColliders::ClusterBase* c_this){
	return (double)(c_this->threshold);
}

bool bullet_btSoftCollidersClusterBase_SolveContact(btSoftColliders::ClusterBase* c_this,btGjkEpaSolver2::sResults* res,btSoftBody::Body* ba,btSoftBody::Body* bb,btSoftBody::CJoint* joint){
	btGjkEpaSolver2::sResults const& c_arg_res=(btGjkEpaSolver2::sResults const&)(*res);
	btSoftBody::Body c_arg_ba=(*ba);
	btSoftBody::Body const c_arg_bb=(*bb);
	btSoftBody::CJoint& c_arg_joint=(btSoftBody::CJoint&)(*joint);
	bool c_out = c_this->SolveContact(c_arg_res,c_arg_ba,c_arg_bb,c_arg_joint);
	bool wrap_out = (c_out);
	return wrap_out;
}

btSoftColliders* bullet_NewbtSoftColliders(){
	btSoftColliders* wrap_out = new btSoftColliders();
	return wrap_out;
}

btSoftClusterCollisionShape* bullet_NewbtSoftClusterCollisionShape(btSoftBody::Cluster* cluster){
	btSoftBody::Cluster const * c_arg_cluster=(btSoftBody::Cluster const *)(void*)(cluster);
	btSoftClusterCollisionShape* wrap_out = new btSoftClusterCollisionShape(c_arg_cluster);
	return wrap_out;
}

btSoftBody::Cluster** bullet_btSoftClusterCollisionShape_GetFieldOfM_cluster(btSoftClusterCollisionShape* c_this){
	return (btSoftBody::Cluster**)(&c_this->m_cluster);
}

btSoftBodyCollisionShape* bullet_NewbtSoftBodyCollisionShape(btSoftBody* backptr){
	btSoftBody * c_arg_backptr=(btSoftBody *)(void*)(backptr);
	btSoftBodyCollisionShape* wrap_out = new btSoftBodyCollisionShape(c_arg_backptr);
	return wrap_out;
}

btEigen* bullet_NewbtEigen(){
	btEigen* wrap_out = new btEigen();
	return wrap_out;
}

int bullet_btEigen_system(btEigen* c_this,btMatrix3x3* a,btMatrix3x3* vectors,btVector3* values){
	btMatrix3x3& c_arg_a=(btMatrix3x3&)(*a);
	btMatrix3x3 * c_arg_vectors=(btMatrix3x3 *)(void*)(vectors);
	btVector3 * c_arg_values=(btVector3 *)(void*)(values);
	int c_out = c_this->system(c_arg_a,c_arg_vectors,c_arg_values);
	int wrap_out = (c_out);
	return wrap_out;
}

#ifdef __cplusplus
}
#endif
